import {PolylineEdge, PolylineEdgeModel} from "@logicflow/core";

class SquareLakePolylineEdgeModel extends PolylineEdgeModel {
    setAttributes() {
        const {properties} = this;
        if (null != properties.isSelected && undefined != properties.isSelected) {
            this.setSelected(properties.isSelected);
        }
        // this.isAnimation = true;

    }

    getAnimation() {
        const animation = super.getAnimation();
        // animation.stroke = '#22dc74';
        return animation;
    }

    getEdgeAnimationStyle() {
        const style = super.getEdgeAnimationStyle();
        // style.strokeDasharray = "100 8";
        style.animationDuration = "20s";
        style.stroke = "#000000";
        return style;
    }

}

export default {
    type: "SquareLakePolylineEdge", view: PolylineEdge, model: SquareLakePolylineEdgeModel
};